/*
 * PayFailedHolder.java
 * business
 *
 * Created by ChenTao on 2017/2/21.
 *
 * Copyright (c) 2017年 yidiandao. All rights reserved.
 */

package com.yidiandao.business.ui.widget.listview.viewholder;

import android.view.View;
import android.widget.TextView;

import com.yidiandao.business.R;
import com.yidiandao.business.data.response.QueryOrderResultResponse;
import com.yidiandao.business.ui.widget.listview.ViewHolder;

/**
 * 购买/支付失败-ViewHolder
 *
 * <p>Created by ChenTao(chentao7v@gmail.com) on 2017/2/21 16:18
 */
public class PayFailedHolder extends ViewHolder {

    public TextView tvPayAgain;
    public TextView tvShowOrder;
    private TextView tvPayError;

    @Override
    protected void initView(View rootView) {
        tvPayAgain = (TextView) rootView.findViewById(R.id.tv_pay_again);
        tvShowOrder = (TextView) rootView.findViewById(R.id.tv_show_order);
        tvPayError = (TextView) rootView.findViewById(R.id.tv_pay_error);
    }

    @Override
    protected int getItemLayoutId() {
        return R.layout.item_pay_failed;
    }

    public void refreshUI(QueryOrderResultResponse.Data data) {
        tvPayError.setText(data.getPayTitle());
    }
}
